package org.example.leetCode;

/**
 * @author Administrator
 */
public class ReverseLeftWords {

    public static void main(String[] args) {
        String s ="abcdefg";
        ReverseLeftWords reverseLeftWords = new ReverseLeftWords();
        String s1 = reverseLeftWords.reverseLeftWords(s, 2);
    }
    public String reverseLeftWords(String s, int n) {
        String substring = s.substring(0, n);
        String substring1 = s.substring(n, s.length());
        StringBuilder stringBuilder = new StringBuilder();
        return String.valueOf(stringBuilder.append(substring1).append(substring));
    }
}
